<#if parentId?has_content>
    <@_model id=parentId>
        <#assign parent=object/>
    </@_model>
</#if>
<div class="pageHeader">
    <form id="pagerForm" onsubmit="return navTabSearch(this);" method="post">
        <div class="searchBar">
            <ul class="searchContent">
                <li>
                    <#if parent?has_content>
                       <label><@t.page 'model.parent'/>:</label><label>${(parent.name)!}</label>
                    </#if>
                </li>
            </ul>
        </div>
    </form>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <#if parent?has_content>
                <li><a href="cmsModel/list.html?parentId=${(parent.parentId?url)!}" target="navTab" rel="cmsModel/list"><i class="icon-circle-arrow-up icon-large"></i> <@t.page 'button.return'/></a></li>
                <li class="line">line</li>
            </#if>
            <li><a href="cmsModel/add.html?parentId=${(parent.id?url)!}" target="navTab" rel="cmsModel/add"><i class="icon-plus-sign-alt icon-large"></i> <@t.page 'module.add'/></a></li>
            <li><a href="cmsModel/add.html?id={sid}" target="navTab" rel="cmsModel/edit"><i class="icon-edit icon-large"></i> <@t.page 'module.edit'/></a></li>
            <@_sysAuthorized roleIds=admin.roles url='cmsModel/delete'>
                <li><a href="cmsModel/delete.do?id={sid}&_csrf=<@_csrfToken admin=true/>" title="<@t.page 'confirm.delete'/>" target="ajaxTodo"><i class="icon-trash icon-large"></i> <@t.page 'button.delete'/></a></li>
            </@_sysAuthorized>
        </ul>
    </div>
<@_modelList parentId=parentId hasChild=hasChild>
    <table class="list" width="100%" layoutH="99">
        <thead>
            <tr>
                <th width="80"><@t.page 'id'/></th>
                <th><@t.page 'name'/></th>
                <th><@t.page 'url'/></th>
                <th><@t.page 'template_path'/></th>
                <th><@t.page 'model.has_images'/></th>
                <th><@t.page 'model.has_attachs'/></th>
                <th><@t.page 'operate'/></th>
            </tr>
        </thead>
        <tbody>
            <#list page.list as a>
            <tr target="sid" rel="${a.id?url}">
                <td>${a.id!}</td>
                <td>${(a.name)!}</td>
                <td>${a.onlyUrl?then(t.pageMessage('yes'),'')}</td>
                <td>${(a.templatePath)!}</td>
                <td>${a.hasImages?then(t.pageMessage('yes'),'')}</td>
                <td>${a.hasFiles?then(t.pageMessage('yes'),'')}</td>
                <td>
                    <#if a.hasChild>
                        <a href="cmsModel/list.html?parentId=${a.id?url}" target="navTab" rel="cmsModel/list"><@t.page 'model.child_management'/></a>
                    </#if>
                </td>
            </tr>
            </#list>
        </tbody>
    </table>
</@_modelList>
</div>